<!-- templates/favorites.html -->
<!DOCTYPE html>
<html>
<head>
  <title>{{ username }}的收藏</title>
</head>
<body>
  <h2>{{ username }} 的收藏电影</h2>
  {% if favorites %}
    <ul>
      {% for movie in favorites %}
        <li>
          {{ movie.title }}
          <form method="post" action="/favorite/remove/{{ movie.id }}" style="display:inline">
            <button type="submit">取消收藏</button>
          </form>
        </li>
      {% endfor %}
    </ul>
  {% else %}
    <p>你还没有收藏任何电影。</p>
  {% endif %}
  <p><a href="/">返回首页</a></p>
</body>
</html>
